package string;

public class TrimDemo {
    public static void main(String[] args){
        String str="   hello!    ";
        System.out.println(str.trim());
        System.out.println(str);
        String str1=str.trim();
        System.out.println(str1);

    }
}
